#pragma once

#include "mousetool.h"

class BMPEraserTool : public MouseTool
{
private:
	static const int IDLE = 0;
	static const int ERASE = 1;
	static const int REPLACE = 2;
	static const int DEFAULT_SIZE = 5;
	static const int MAX_SIZE = 50;
	/** 0 idle, 1 erase, 2 replace */
	int m_state;
public:
	static const char * NAME;
	const char * getName();
	BMPEraserTool(void * a_context):MouseTool(a_context),m_state(IDLE)
	{m_tool.set(0,0,DEFAULT_SIZE,DEFAULT_SIZE);getButton()->setToggleable(true);}
	/** called when the mouse is pressed */
	bool pressedTool(const int & a_mouseButton);
	/** called as the mouse is dragged */
	bool draggedTool(const int & a_mouseButton);
	/** called when the mouse is released */
	bool releasedTool(const int & a_mouseButton);
	void draw(SDL_Surface * a_surface);
};